Add a condition disk clean-up step to reclaim some disk space in pr-comment-trigger & provider-ci reusable workflows #188
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description of your changes
We have failing CI workflows in the
release-0.47
branch ofupbound/provider-aws
with insufficient disk space. An example run is here. We would like to give thejlumbroso/free-disk-space
action a try in that branch to see whether it resolves these issues. Previously we had relied on manual running of the failing jobs for that branch. This action has already helped us for runninguptest
on the free hosted runners.This PR also makes them conditional. An observation from @sergenyalcin after we introduced the
jlumbroso/free-disk-space
is that it takes around 7m on a larger hosted runner with more disk space. We don't need to run the disk cleanup action for those larger runners and thus a switch to control the enablement of the step will help. By default, we won't running the disk cleanup step and we will only enable it when needed.In this PR, we don't implement a fine granular switch specific to each job which controls the disk cleanup step but rather a global switch for all the jobs defined in a workflow. Also we did not include the disk cleanup step for each and every job in a workflow. I don't think we currently need a granular control specific to each job atm. We can keep adding the clean-up step for the remaining jobs as needed.
I have:
make reviewable test
to ensure this PR is ready for review.How has this code been tested
Tested with the previously failing
check-diff
job here: https://github.com/upbound/provider-aws/actions/runs/8186204677/job/22384138959?pr=1197. Please also see crossplane-contrib/provider-upjet-aws#1197.